<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta name="author" content="Wink Hosting (www.winkhosting.com)" />
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<link rel="stylesheet" href="images/style.css" type="text/css" />
	<title>Clever DropBox</title>
</head>
<body>
	<div id="contenttext">
			<div class="bodytext" style="padding:12px;" align="justify">
			<% 
			if(session.getAttribute("No error")!=null || session.getAttribute("Login")!=null)
			{
				response.sendRedirect("afterLogin.jsp");
				%>
				<!-- <meta HTTP-EQUIV="REFRESH" content="0; url=afterLogin.jsp"> -->
			<%}
			 else
			 {%>
				 <blockquote>
			    <p><span class="orangelogotext">Login</span><br />
		        </p>
		      </blockquote>
              <form action="/LoginServlet" method="post" name="form1" target="body" id="form1">
			  <table width="309" height="106" border="0">
			    <tr>
			      <td width="60">User Name:</td>
			      <td width="239"><input type="text" name="UserNameTextBox" id="UserNameTextBox" /></td>
		        </tr>
			    <tr>
			      <td>Password:</td>
			      <td><input type="password" name="PasswordTextBox" id="PasswordTextBox" />
		          <input type="submit" name="LoginButton" id="LoginButton" value="Login" />
                  </td>
		        </tr>
		        <tr>
			      <td colspan="2">
			      <%
				  if(session.getAttribute("error user name or password")!=null)
				  {
				  %>
				  		<br/>
				  		<span style="color:red">User name/Password incorrect</span>
						<br/>	
				  		<%
				  		
				  		session.removeAttribute("error user name or password");
				 		 %>
				  <%
				  } 
				  %>
       			  </td>
		        </tr>
			    <tr>
			      <td colspan="2">
                  <p>For register<a href="register.jsp" target="body"> click here</a>.</p>
                  <p><a href="forgotYouPass.jsp"  target="body">Forgot your password?</a></p></td>
		        </tr>
		      </table>
		       </form>
			<% }%>
			 </div>
		  </div>
</body>
</html>
